<template>
  <view class="container">

    <view class="content">
      <view class="info-item">用户: {{ username }}</view>
      <view class="info-item">ID: {{ userId }}</view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      username: 'liudan',
      userId: '010'
    }
  },
  onLoad(options) {
    // 接收跳转时传递的参数
    console.log("onLoad--> 参数: " + JSON.stringify(options));
    this.username = options.user || 'liudan';
    this.userId = options.userId || '010';
  }
}
</script>

<style scoped>
.container {
  padding: 20rpx;
}

.page-header {
  padding: 30rpx 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 30rpx;
}

.page-title {
  font-size: 34rpx;
  font-weight: bold;
}

.content {
  padding: 20rpx;
}

.info-item {
  font-size: 30rpx;
  margin-bottom: 20rpx;
  color: #333;
}
</style>